import java.util.*;

class Node{
	List<Node> children = new ArrayList<Node>();
	Node parent;
	Object value;
	Node(){
	}
	
	public void print(){
		if(children.get(1) !=null){
			Node n = children.get(1);
			System.out.println("---" + n.value);
			n.print();
		}else if(children.get(0) !=null){
			Node n = children.get(0);
			n.print();
		}else{
			System.out.println("v" +value);
		}
	}
}

public class AST {
	
	/**
	 * Method main
	 *
	 *
	 * @param args
	 *
	 */
	public static void main(String[] args) {
		// TODO: Add your code here
	}	
}
